<?php

class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    protected function _initAutoload(){
        $sessionConfig = new Zend_Config_Ini('../application/configs/session.ini', 'development');
		Zend_Session::setOptions($sessionConfig->toArray());
		Zend_Session::start();
    }
	
	protected function _initDb(){
		$resource = $this->getPluginResource('multidb');
		$resource->init();
		$dealers_db = $resource->getDb('dealers_db');
        $cars_db = $resource->getDb('cars_db');
		$hxb_db = $resource->getDb('hxb_db');
		$maozhua_wb = $resource->getDb('maozhua_wb');
		
		Zend_Registry::set('dealers_db', $dealers_db );
		Zend_Registry::set('cars_db', $cars_db );
        Zend_Registry::set('hxb_db', $hxb_db );
		Zend_Registry::set('maozhua_wb', $maozhua_wb );
	 }
}